<template>
	<view class="contant">
		<view class="bigbox">
			<view class="nav">
				<image src="https://fangguaner.wm76.mtnet.ren/static/applet/ɨһɨ(1).png" mode=""></image>
				<text>请客户微信扫码</text>
			</view>
			<view class="agentimg">
				<image :src="shujuobject.agent.header_img" mode=""></image>
			</view>
			<view class="agentname">
				{{shujuobject.agent.name}}
			</view>
			<view class="agent">
				房倌儿经纪人
			</view>
			<view class="qrimg">
				<tki-qrcode ref="qrcode" :val="val" :size="size" :loadMake="loadMake" :unit="unit" :onval="onval" :showLoading="showLoading"
				 :background="background" :foreground="foreground" :pdground="pdground" :iconsize="iconsize" :lv="lv"
				 :usingComponents="usingComponents" :src="src" :loadingText="loadingText" @result="qrR" />
			</view>

			<view class="tiem">
				<text>{{shujuobject.time}}</text>
			</view>
			<view class="seehouse">
				带您看房
			</view>
			<view class="affirm">
				微信扫码,确认真实房！
			</view>
		</view>
	</view>
</template>

<script>
	import {geterweima} from "../../api/api/index.js"
	export default {
		data() {
			return {
				// 二维码
				val: "",
				onval: true,
				usingComponents: true,
				showLoading: false,
				size: 330,
				background: '#ffffff',
				foreground: '#000000',
				pdground: '#000000',
				icon: '',
				iconsize: 30,
				lv: 3,
				unit: 'upx',
				loadMake: true,
				src: '',
				loadingText: '我是二维码',
				shujuobject:{},
			}
		},
		methods: {
			qrR(e) {
				console.log(e)
			},
		},
		onLoad(e) {
			this.val=e.id
			geterweima({follow_up_id:e.id}).then(res=>{
				this.shujuobject=res.data
			})
		}
	}
</script>

<style scoped lang="less">
	.contant {
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		padding: 50rpx 30rpx;
		box-sizing: border-box;

		.bigbox {
			height: 100%;
			width: 100%;
			box-shadow: 0rpx 2rpx 7rpx 0rpx rgba(0, 0, 0, 0.2);
			border-radius: 20rpx;

			.nav {
				width: 100%;
				height: 114rpx;
				background-color: #FFF6ED;
				line-height: 114rpx;
				display: flex;
				align-items: center;
				margin: 0 auto;
				border-top-left-radius: 20rpx;
				border-top-right-radius: 20rpx;

				image {
					width: 34rpx;
					height: 34rpx;
					margin-left: 205rpx;
				}

				text {
					font-family: MicrosoftYaHei;
					font-size: 30rpx;
					color: #e60202;
					margin-left: 20rpx;
				}
			}

			.agentimg {
				width: 100%;
				margin: 0 auto;
				text-align: center;
				margin-top: 69rpx;

				image {
					width: 200rpx;
					height: 200rpx;
					border-radius: 200rpx;
				}
			}

			.agentname {
				width: 100%;
				text-align: center;
				font-size: 36rpx;
				font-family: MicrosoftYaHei;
				color: #000000;
				margin-top: 43rpx;
				font-weight: 700;
			}

			.agent {
				width: 100%;
				font-size: 20rpx;
				font-family: MicrosoftYaHei;
				color: #aaaaaa;
				margin-top: 15rpx;
				text-align: center;
			}

			.qrimg {
				width: 330rpx;
				height: 330rpx;
				margin: 0 auto;
				margin-top: 50rpx;
			}

			.tiem {
				width: 100%;
				text-align: center;
				font-family: MicrosoftYaHei;
				font-size: 30rpx;
				color: #000000;
				text-align: center;
				margin-top: 92rpx;
			}

			.seehouse {
				width: 100%;
				text-align: center;
				font-family: MicrosoftYaHei;
				font-size: 30rpx;
				color: #000000;
				text-align: center;
				margin-top: 20rpx;
			}

			.affirm {
				width: 100%;
				text-align: center;
				font-family: MicrosoftYaHei;
				font-size: 24rpx;
				margin-top: 63rpx;
				color: #868686;
			}
		}
	}
</style>
